<!-- TODO:
 1. easier access to login
    a. clientid default "Appdevices", ask for user input if wrong
      (Error: 401 invalid user or password | 400 invalid client or client secret necessary)
    b. url separated from user/pwd for better ux
 2. Guide through the apps functions (e.g. in Evernote)
 3.
-->

<androidx.coordinatorlayout.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/cardview_light_background">

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="56dp"
        android:paddingLeft="24dp"
        android:paddingRight="24dp"
        style="@style/LoginEditText">

        <ImageView android:src="@drawable/logo"
            android:layout_width="wrap_content"
            android:layout_height="72dp"
            android:layout_marginBottom="24dp"
            android:layout_gravity="center_horizontal"
            style="@style/Theme.AppCompat.Light"/>

        <!--  Email Label -->
        <com.google.android.material.textfield.TextInputLayout
            style="@style/LoginEditText"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp">
            <EditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/input_url"
                android:textColor="@color/aruba_grey"
                android:hint="@string/clearpass_url"
                android:inputType="textUri" />
        </com.google.android.material.textfield.TextInputLayout>

        <com.google.android.material.textfield.TextInputLayout
            style="@style/LoginEditText"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp">
            <EditText android:id="@+id/input_client_id"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:inputType="text"
                android:textColor="@color/aruba_grey"
                android:hint="@string/clientid"/>
        </com.google.android.material.textfield.TextInputLayout>

        <com.google.android.material.textfield.TextInputLayout
            style="@style/LoginEditText"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp">
            <EditText android:id="@+id/input_username"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="@color/aruba_grey"
                android:inputType="text"
                android:hint="@string/username"/>
        </com.google.android.material.textfield.TextInputLayout>

        <!--  Password Label -->
        <com.google.android.material.textfield.TextInputLayout
            style="@style/LoginEditText"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp">
            <EditText android:id="@+id/input_password"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="@color/aruba_grey"
                android:inputType="textPassword"
                android:hint="@string/password"/>
        </com.google.android.material.textfield.TextInputLayout>

        <Switch
            style="@style/LightTheme"
            android:id="@+id/savePw"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            android:text="@string/save_password" />
        <Button
            android:background="@color/aruba_orange"
            android:id="@+id/btn_login"
            android:layout_width="100dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="24dp"
            android:layout_marginBottom="24dp"
            android:padding="12dp"
            android:layout_gravity="center"
            android:text="@string/login"
            android:textColor="@color/white"/>
    </LinearLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>